<?php

abstract class Core_Sender {
	
	protected $phpMailer = null;
	
	public function __construct($config) {
		require_once 'class.phpmailer.php';
		
		$this->phpMailer = new PHPMailer();
		$this->phpMailer->CharSet = $config->charSet;
		$this->phpMailer->IsSMTP(true);
		$this->phpMailer->Sender = $config->from;
		$this->phpMailer->SMTPDebug = (bool)$config->smtp->debug;
		$this->phpMailer->SMTPAuth = (bool)$config->smtp->auth;
		$this->phpMailer->SMTPSecure = $config->smtp->secure;
		$this->phpMailer->Host = $config->smtp->host;
		$this->phpMailer->Port = $config->smtp->port;
		$this->phpMailer->Username = $config->smtp->user;
		$this->phpMailer->Password = $config->smtp->password;
		$this->phpMailer->From = $config->from;
		$this->phpMailer->FromName = $config->fromName;
	}
	
} 